<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>DataList演示文档</title>
  </head>
  <body>
    <form action="#">
      <input list="datalist" />
      <datalist id="datalist">
        <option value="Alabama"></option>
        <option value="California"></option>
        <option value="Delaware"></option>
        <option value="Florida"></option>
        <option value="Hawaii"></option></datalist
      ><br />
    </form>

    <form action="">
      <!-- 冰淇淋口味 -->
      <label for="choice">Choose a flavor:</label>
      <input list="ice-cream-flavors" id="choice" name="choice" />

      <datalist id="ice-cream-flavors">
        <option value="Chocolate"></option>
        <option value="Coconut"></option>
        <option value="Mint"></option>
        <option value="Strawberry"></option>
        <option value="Vanilla"></option>
      </datalist>
    </form>
  </body>
</html>
